The key to a healthy and well performing Dynamics CRM environment is to perform regular and ongoing maintenance and system monitoring to proactively make adjustments to CRM and related components where needed.
- See the Dynamics CRM Implementation Guide (Operating and Maintaining) for maintenance recommendations from Microsoft.
- SQL Server (on-premises):
- Backup and restore plan: To recover from any scenario, you must back up all needed information and store a copy off site. A backup plan should be created and rehearsed for all Microsoft Dynamics CRM components and services to make sure that, if a disk or other failure occurs, the maximum amount of data is recoverable.
- Default maintenance jobs: When installing CRM, several maintenance jobs are defined and scheduled; There's a tool named CRM Maintenance Job Editor for viewing/scheduling these jobs. Learn what each job does; turn off or replace any that your DBA or CRM owner decides are not wanted (e.g., the Reindex All job can be replaced with your own SQL maintenance jobs). Make sure jobs are scheduled during times of low system usage.
- Analyze queries that take the longest to run, determine the source of the query and work on trying to reduce the query time by improving the query and/or adding indexes. SQL Profiler can help identify long-running queries.
- Control the growth of the PrincipleObjectAccess (POA) table.
- Default Solution / Metadata: It's a good practice to export the CRM default solution and metadata and keep the files in a source control system (Git, TFS, etc.)
- Altriva has a metadata export tool that writes most CRM metadata (entities, attributes, workflows, etc.) to comma-delimited (csv) files. This makes comparison of exported metadata over time very easy.
- System and User Queries/Views: Review user views and system views periodically for possible performance impact.
- Default views that return large amounts of unhelpful information can lead to less productivity and for the on-premises version of CRM this can lead to slow system performance due to unnecessary queries and/or result sets. For example, if the default Accounts list queries for and lists all accounts but no one using CRM needs to see all accounts then consider changing the default view so that it doesn't show any accounts or only a user's accounts (by ownership).
- Quick Find: For the Quick Find queries that are used most often, verify that the fields CRM searches are limited to only those that are most important to find records. The more fields CRM needs to include in the query, the longer it will take to get results and the more impact the query has on SQL Server.